import React from 'react';
import ReactDOM from 'react-dom';


// 导入store对象
import { store } from './redux/store';

// 此处直接打印store对象会报错
// console.log(store);

import './index.css';

// 导入评论组件Comments
import Comments from './components/Comments';
render();

// 监听数据改变, 重新渲染页面
store.subscribe(render);

function render() {
    ReactDOM.render(<Comments store={store} />, document.getElementById('root'));
}


